package com.company;

enum WeekDay{
    SUN("星期日"),MON("星期一"),TUE("星期二"),WED("星期三"),THU("星期四"),FRI("星期五"),SAT("星期六");
    private String chinese;
    private WeekDay(String chinese){
        this.chinese = chinese;
    }
    public String toChinese(){
        return chinese;
    }


}

public class Enum {
    public Enum(){
        for(WeekDay wd : WeekDay.values()){
            System.out.println(wd);
        }
        WeekDay fri = WeekDay.FRI;
        System.out.println("Fri.name() = " + fri.toChinese());
        System.out.println("Fri.ordinal() = " + fri.ordinal());
        System.out.println(WeekDay.valueOf("FRI").toChinese());
    }
}
